import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/forum",
    name: "Forum",
    component: () => import("../views/Forum.vue"),
  },
  {
    path: "/cart",
    name: "Cart",
    component: () => import("../views/Cart.vue"),
  },
  {
    path: "/detail",
    name: "Detail",
    component: () => import("../views/Detail.vue"),
    meta: {
      isHideNav: true,
    },
  },
  {
    path: "/user",
    name: "User",
    component: () => import("../views/User.vue"),
  },
  {
    path: "/gong",
    name: "Gong",
    component: () => import("../views/Gong.vue"),
  },
  {
    path: "/reg",
    name: "Reg",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Reg.vue"),
  },
  {
    path: "/login",
    name: "Login",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Login.vue"),
  },
  {
    path: "/categroy",
    name: "Categroy",
    component: () => import("../views/Categroy.vue"),
  },
  {
    path: "/pdetail",
    name: "Pdetail",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Pdetail.vue"),
  },
  {
    path: "/pcategroy/:id?",
    name: "Pcategroy",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Pcategroy.vue"),
  },
  {
    path: "/comment/:id?",
    name: "Comment",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Comment.vue"),
  },
  {
    path: "/zixun",
    name: "Zixun",
    component: () => import("../views/Zixun.vue"),
  },
  {
    path: "/zixuncategroy",
    name: "Zixuncategroy",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Zixuncategroy.vue"),
  },
  {
    path: "/adetail",
    name: "Adetail",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Adetail.vue"),
  },
  {
    path: "/order",
    name: "Order",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Order.vue"),
  },
  {
    path: "/odetail",
    name: "Odetail",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Odetail.vue"),
  },
  {
    path: "/fatie",
    name: "Fatie",
    meta: {
      isHideNav: true,
    },
    component: () => import("../views/Fatie.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
